* {
    margin: 0;
    padding: 0;
}

*:focus {
    outline: none;
}

/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar {
    width: 7px;
    /* height: 7px; */
    background-color: #F5F5F5;
    border-radius: 10px;
}

/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    background-color: #F5F5F5;
}

/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb {
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
    background-color: #c8c8c8;
    min-height: 20px;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

html,
body {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(30deg, lightskyblue, plum, lightskyblue);
    /* background-color: var(--white);
    background: url("https://res.cloudinary.com/dwbddafc1/image/upload/v1597151453/background_n6feku.jpg");
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover; */
    font-family: 'Nunito', sans-serif;
    overflow: hidden;
}

body>div {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Nunito', sans-serif;
}

main {
    background-color: rgba(255, 255, 255, 0.5);
    width: 80%;
    height: 80%;
    box-shadow: 0px 0px 100px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    /* transform-origin: 40px 40px; */
    transform-origin: bottom;
}

.copyright {
    margin: 40px 0 0 0;
}

.navigation {
    background: rgba(73, 73, 73, 0.7);
    height: 40px;
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.navigation>a {
    color: white;
    font-size: 14px;
    text-decoration: none;
}

a {
    cursor: pointer;
}

.title {
    font-size: 36px;
    font-family: 'Nunito', sans-serif;
    margin-bottom: 20px;
}

main .code-article {
    height: 100%;
    width: 50%;
    padding: 0 5% 0 2%;
    display: flex;
    flex-direction: column;
    border-right: solid 2px whitesmoke;
}

main .analysis-article {
    height: 100%;
    width: 50%;
    padding: 0 2% 0 5%;
    display: flex;
    flex-direction: column;
}

main article header {
    height: 10%;
    font-size: 26px;
    padding-top: 5%;
    font-family: 'Nunito', sans-serif;
}

main article div {
    height: 85%;
}

main article div textarea {
    background-color: rgba(255, 255, 255, 0.3);
    height: 96%;
    width: 90%;
    border: none;
    border-radius: 20px;
    padding: 2% 5% 2% 5%;
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    resize: none;
    transition: .5s;
}

main article div textarea:focus {
    transform: scale(1.5) translateY(-5%) translateX(13%);
    background: white;
    opacity: .95;
    width: 150%;
    font-size: 10px;
    position: relative;
    z-index: 1;
}

main article footer {
    display: flex;
    height: 5%;
    justify-content: space-between;
    padding: 4% 0 4% 0;
}

button {
    background-color: rgba(255, 255, 255, 0.3);
    width: 45%;
    border: none;
    border-radius: 20px;
    color: gray;
    transition: 0.3s;
}

button:hover {
    background: lightskyblue;
    opacity: 0.5;
    color: white;
    outline: none;
    cursor: pointer;
}

button:active {
    transform: scaleX(.5) scaleY(.8);
}

/* 一层蒙板 */
.cover {
    width: 100%;
    height: 85%;
    overflow: hidden;
}

.page-container {
    width: 400%;
    height: 100%;
    display: flex;
    flex-direction: row;
    position: relative;
    transition: 800ms;
    right: 0;
}

.page-container>section {
    width: 25%;
    height: 100%;
    /* background-color: rgba(255, 255, 255, 0.1); */
    border-radius: 20px;
    border: none;
    padding-left: 0.5%;
    padding-right: 0.5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-container>section label {
    text-align: center;
    padding: 0 20px 0 20px;
}

.page-container>section>label:nth-of-type(1) {
    font-size: 36px;
    width: fit-content;
    border-bottom: solid 2px gray;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.page-container>section>label:nth-of-type(2) {
    font-size: 12px;
}

.page-container>section>button,
#young-detail {
    width: fit-content;
    height: fit-content;
    font-size: 50px;
    background: none;
    /* transition: 0.3s; */
    margin-top: 40px;
}

.page-container>section>button:hover,
#young-detail:hover {
    color: lightskyblue;
}

#young-detail:active {
    transform: scale(.5);
}

.analysis-young {
    position: absolute;
    width: 86%;
    height: 86%;
    background-color: rgba(255, 255, 255, 0.9);
    /* box-shadow: 0px 0px 100px rgba(100, 100, 100, .8); */
    box-shadow: 0px 0px 100px rgba(0, 0, 0, 0.5);
    top: 10%;
    left: 7%;
    border-radius: 10px;
    z-index: 1;
    transform: scale(0);
}

.analysis-young-display {
    z-index: 1;
}

.appear-scalex {
    animation-name: appear-scalex;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

.disappear-scalex {
    animation-name: disappear-scalex;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

@keyframes appear-scalex {
    from {
        transform: scale(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    60% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(1.05);
    }

    to {
        transform: scale(1);
    }
}

@keyframes disappear-scalex {
    from {
        transform: scale(1);
    }

    30% {
        transform: scale(1.05);
    }

    40% {
        transform: scale(1.05);
    }

    60% {
        opacity: 1;
    }

    to {
        transform: scale(0);
        opacity: 0;
    }
}

.hint-young {
    position: absolute;
    display: flex;
    flex-direction: column;
    width: 10%;
    right: 5px;
    top: 5%;
}

.hint-young>label:nth-of-type(1) {
    justify-content: center;
    text-align: center;
    font-size: 20px;
}

.hint-young>label:nth-of-type(2) {
    justify-content: center;
    text-align: center;
    font-size: 12px;
}

.eden {
    position: absolute;
    width: 83%;
    height: 50%;
    top: 5%;
    left: 5%;
    border-radius: 20px;
}

.eden>label:nth-of-type(1),
.s1>label:nth-of-type(1),
.s2>label:nth-of-type(1),
.old>label:nth-of-type(1) {
    font-size: 24px;
    font-weight: bold;
}

.analysis-young>div>label:nth-of-type(2),
.analysis-young>div>label:nth-of-type(3) {
    font-size: 8px;
}

.analysis-young>div>label:nth-of-type(2) {
    border-right: solid 2px gray;
    padding: 0 5px 0 5px;
}

.eden>section,
.s1>section,
.s2>section,
.old>section {
    display: flex;
    flex-wrap: wrap;
    height: 100%;
    overflow: auto;
}

/* Althoght not showed in HTML, we'll create divs in analysis */
section>div {
    background: gainsboro;
    display: flex;
    flex-direction: column;
    width: 40px;
    height: 50px;
    border-radius: 10px;
    padding: 10px;
    margin: 2px;
    transition: 0.5s;
}

section>div:hover {
    transform: scale(.8);
}

section>div>label {
    justify-content: center;
    text-align: center;
    font-size: 4px;
}

section>div>label:nth-of-type(1) {
    font-size: 8px;
    margin-bottom: 4px;
}

.s1 {
    position: absolute;
    width: 30%;
    height: 30%;
    left: 5%;
    bottom: 8%;
    border-right: solid 2px gainsboro;
}

.s2 {
    position: absolute;
    width: 30%;
    height: 30%;
    left: 37.5%;
    bottom: 8%;
    border-right: solid 2px gainsboro;
}

.old {
    position: absolute;
    width: 30%;
    height: 30%;
    right: 0;
    bottom: 8%;
}

article>aside {
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 5%;
    right: -5%;
}

.start-young,
.back-young,
.reset-young {
    display: flex;
    border-radius: 100%;
    background: skyblue;
    height: 50px;
    width: 50px;
    text-align: center;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    margin-top: 10px;
    box-shadow: 0px 0px 100px rgba(100, 100, 100, .5);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -moz-user-select: none;
    transition: .3s;
    transform: scale(0);
}

.start-young:active,
.back-young:active,
.reset-young:active {
    transform: scale(.8);
}

.start-young:hover,
.reset-young:hover {
    background: lightgreen;
    animation-name: scalex-shake;
    animation-duration: .2s;
    cursor: pointer;
}

.back-young:hover {
    background: red;
    animation-name: scalex-shake;
    animation-duration: .2s;
    cursor: pointer;
}

@keyframes scalex-shake {
    25% {
        transform: scale(.8);
    }
}